package cloud.xiangyixiang.www.spring.boot.java.basics.utils;

import cloud.xiangyixiang.www.spring.boot.java.basics.annotations.Desc;

/**
 * <p>
 * 麻雀
 * </p>
 *
 * @author weixin
 * @date 2023/9/7 16:11
 */
public class Sparrow extends Bird{

    private Desc.Color color;

    /**
     * 默认是浅灰色
     */
    public Sparrow() {
        color = Desc.Color.Grayish;
    }

    /**
     * 构造函数定义鸟的颜色
     * @param descColor {@link Desc.Color}
     */
    public Sparrow(Desc.Color descColor) {
        color = descColor;
        System.out.println("子类麻雀初始化颜色：" + color);
    }

    @Override
    public Desc.Color getColor() {
        System.out.println("子类麻雀颜色：" + color);
        return color;
    }

}
